package com.test.resumeanalysis.data

import android.icu.text.Transliterator.Position
import androidx.lifecycle.LiveData
import androidx.room.*
import com.test.resumeanalysis.data.model.JobPost
import com.test.resumeanalysis.data.model.resume.ResumeParse

@Dao
interface ResumeDao {
    @Query("SELECT * FROM RESUME_TABLE ")
    fun getAllData(): LiveData<List<ResumeParse>>

    @Query("SELECT * FROM RESUME_TABLE WHERE id = :position")
    fun getDataById(position:Int):LiveData<ResumeParse>

    @Insert(onConflict = OnConflictStrategy.IGNORE)
    suspend fun insertData(resumeParse: ResumeParse)

    @Update
    suspend fun upData(resumeParse: ResumeParse)

    @Delete
    suspend fun delData(resumeParse: ResumeParse)
}

